package com.jjyu.dao;

import com.jjyu.entity.RestaurantFavorite;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

@Mapper
public interface RestaurantFavoriteMapper {

    @Insert("INSERT INTO restaurant_favorites (user_id, restaurant_id, added_at) VALUES (#{user_id}, #{restaurant_id}, #{added_at})")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    int insert(RestaurantFavorite favorite);
}
